#include <stdio.h>

typedef union
{
    struct
    {
        unsigned char head;
        unsigned char body;
        unsigned char end;
        unsigned char cksum;
    }data;
    unsigned int num;        
}ST;

int main()
{
    ST st  = {0};
    st.num = 0x522135;
    unsigned int out;
    int i;
    for(i=0;i<3;i++)
    {
        printf("%x\n", *(char *)(&st.data.head + i)); 
    }
}
